#include<stdio.h>
int main() {
	int count = 0;
	for (int i = 1; i <= 9; i++) {
		for (int j = 0; j <= 9; j++) {
			for (int k = 0; k <= 9; k++) {
				if (i != j && i != k && k != j)
					count++;
			}
		}
	}
	printf("count=%d", count);
	return 0;
}